
; Big Bomb Class
; timed bomb that bounces, does not hurt on impact but delivers massive splash damage

(load "weapon.scm")
(load "explosion.scm")


(define big-bomb%
  (class weapon%
    
    ; PHYSICS-OBJECT%
    (inherit-field position)
    ; PRIVATE VARIABLES
    (define time-left #i4)
    
    ; Update
    (define/override (update)
      (set! time-left (fl- time-left *time-delta*))
      (if (fl<= time-left 0)
          ; add explosion
          (begin
            (send *world* add-object (new explosion% [magnitude 3] [position position] [damage 40]))
            #f)
          #t))
    
    ; Constructor/Initialization
    (super-new [weapon-name "big bomb"] [weapon-speed #i200] [clip-size 1] [reload-time #i3] [damage 0])))

